package com.baike.job;

import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;

import javax.xml.ws.Action;
//业务逻辑所在
//实现job接口 job(任务) quartz的核心  我们想要调度的任务必须实现job接口
public class IncrementJob implements Job {

    @Autowired
    private RedisTemplate redisTemplate;

    //重写execute()方法 编写执行的业务代码
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
//        JobDetail jobDetail = context.getJobDetail();
//        Trigger trigger = context.getTrigger();
        redisTemplate.boundValueOps("discountsNum").set(100);
        System.out.println("one:test执行了");

    }
}
